import React,{useRef} from 'react'
import './assets/css/app.css'
export default function App() {
  const changeBall=()=>{
    boxEle.current.style.transition="all .5s"
    boxEle.current.style.transform="translate(100px,0)"
  }
  const boxEle=useRef()
  return (
    <div>
      <div className="box" ref={boxEle} onClick={changeBall}></div>
    </div>
  )
}
